﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master" CodeFile="porEgreso.aspx.cs" Inherits="Informes_porEgreso" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="../UserControls/Fecha.ascx" TagName="Fecha" TagPrefix="uc1" %>
<asp:Content ID="Content1"  ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="text-align: center; vertical-align: text-top;">
    <asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager>
        
<table class="tablaForm" style=" width:100%; text-align:left">
    <tr>
        <td colspan="4" class="tdInfo" align="right">
            Egresos por Fecha</td>
            </tr>
    <tr>
        <td align="left" class="tdForm" colspan="4" style="text-align: center">
            <asp:Label id="lblAccion" runat="server" CssClass="lblAccion"></asp:Label>
        </td>
    </tr>
    <tr>
        <td style="WIDTH: 25%" class="tdForm" align="right">
            C&oacute;digo:&nbsp;</td>
         <td colspan="3" style="WIDTH: 75%" class="tdForm" align="left">
            <asp:TextBox id="txtCodigo" runat="server" CssClass="cuadrotxt"></asp:TextBox>
            &nbsp;
            <asp:CheckBox ID="chkSinCompras" runat="server" Checked="True" Text="Sin Compras" />
         </td>
    </tr>
    <tr>
        <td style="WIDTH: 25%" class="tdForm" align="right">
            Concepto:&nbsp;</td>
        <td colspan="3" style="WIDTH: 75%" class="tdForm" align="left">
            <asp:TextBox id="txtNombre" runat="server" CssClass="cuadrotxt100"></asp:TextBox> 
        </td>
        </tr>
    <tr>
        <td align="right" class="tdForm" style="width: 25%">
            Centro Costos:&nbsp;
        </td>
        <td align="left" class="tdForm" colspan="3" style="width: 75%">
            <asp:RadioButton ID="rdbTodos" runat="server" AutoPostBack="True" CausesValidation="True"
                OnCheckedChanged="rdbTodos_CheckedChanged" Text="Todos" ValidationGroup="vgCentros" />&nbsp;<asp:RadioButton
                    ID="rdbActivos" runat="server" AutoPostBack="True" CausesValidation="True" OnCheckedChanged="rdbActivos_CheckedChanged"
                    Text="Seleccionar" ValidationGroup="vgCentros" />&nbsp;<asp:DropDownList ID="cboCCostos"
                        runat="server" Width="70%">
                    </asp:DropDownList></td>
    </tr>
     <tr id="trFechas" runat="server">
        <td class="tdLiteral" style="width: 25%; text-align: right">
            Fecha Desde:</td>
        <td class="tdForm" style="width: 25%; text-align: left">
            <uc1:fecha id="FechaD" runat="server"></uc1:fecha>
        </td>
        <td class="tdLiteral" style="width: 25%; text-align: right">
            Fecha Hasta:</td>
        <td class="tdForm" style="width: 25%; text-align: left">
            <uc1:fecha id="FechaH" runat="server"></uc1:fecha>
        </td>
    </tr>
    <tr>
        <td colspan="4" class="tdForm" style="text-align:center">
            <asp:GridView id="gvEgresos" runat="server" BorderWidth="1px" BackColor="White" Width="100%" OnPageIndexChanging="gvEgresos_PageIndexChanging" 
                CellPadding="3" AllowPaging="True" AutoGenerateColumns="False" 
                DataKeyNames="Id_Egreso" BorderColor="#999999" BorderStyle="None" GridLines="Vertical">
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black"></FooterStyle>
                <columns>
                    <asp:TemplateField HeaderText="C&#243;digo">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Numero" runat="server" Text='<%# Bind("Id_Egreso") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                     <asp:TemplateField HeaderText="Concepto">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Concepto" runat="server" Text='<%# Bind("Id_Concepto") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                     <asp:TemplateField HeaderText="Fecha">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Fecha" runat="server" Text='<%# Bind("Fecha", "{0:dd/MM/yyyy}") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField HeaderText="Monto">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Monto" runat="server" Text='<%# Bind("Monto","{0:F2}") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                     <asp:TemplateField HeaderText="Observaciones">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Obs" runat="server" Text='<%# Bind("Observaciones") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                </columns>
                <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center"></RowStyle>
                <EditRowStyle Wrap="True"></EditRowStyle>
                <SelectedRowStyle BackColor="#008A8C" ForeColor="White" Font-Bold="True"></SelectedRowStyle>
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center"></PagerStyle>
                <HeaderStyle BackColor="#325FB9" ForeColor="White" Font-Names="Arial Rounded MT Bold" Font-Bold="True"></HeaderStyle>
                <AlternatingRowStyle BackColor="Gainsboro"></AlternatingRowStyle>
            </asp:GridView>
            </td>
            </tr>
        </table><br /><br />
    
    
    <table class="tdForm">
        <tr>
            <td class="tdLiteral" colspan="4" style="text-align: center">
                <asp:Label ID="lblTipo" runat="server" CssClass="lblAccion"></asp:Label></td>
        </tr>
         <tr>
            <td class="tdLiteral" style="width: 25%; text-align: right">
                <asp:Label ID="lblLCantidad" runat="server" Font-Bold="True">Operaciones:</asp:Label></td>
            <td class="tdForm" style="width: 25%; text-align: left">
                &nbsp;<asp:Label ID="lblCantidad" runat="server" Font-Bold="True"></asp:Label></td>
            <td class="tdLiteral" style="width: 25%; text-align: right">
                <asp:Label ID="Label1" runat="server" Font-Bold="True">Total $:</asp:Label></td>
            <td class="tdForm" style="width: 25%; text-align: left">
                &nbsp;<asp:Label ID="lblTotal" runat="server" Font-Bold="True"></asp:Label>&nbsp;
            </td>
        </tr>
        </table>
    &nbsp;<table class="tdForm">
        <tr>
            <td style="width: 100%" class="tdBotones"> &nbsp;
                <asp:Button ID="btnCancelar" runat="server" OnClick="btnCancelar_Click" Text="Cancelar" Width="70px" />
                &nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnVer" runat="server" OnClick="btnVer_Click" Text="Ver" Width="70px" />
                &nbsp;
                <asp:Button ID="btnOtro" runat="server" Text="Otro Inf." Width="70px" OnClick="btnOtro_Click" /></td>
        </tr>
    </table>
    </div>
    <asp:Panel ID="pnlFecha" runat="server" CssClass="tdBotones" Style="display: none"
        Width="233px">
        <div style="background-image: none; background-color: transparent; text-align: center">
            Fecha Desde NO puede ser Posterior a Fecha Hasta.<br /><p></p>
            <asp:Button ID="btnOkCero" runat="server" Text="OK" Width="64px" />
        </div>
    </asp:Panel>
    <table id="Table1" runat="server" border="0" style="width: 0px; height: 0px">
        <tr>
            <td style="width: 100px; height: 18px">
                <asp:Button ID="btnCero" runat="server" Height="0px" Text="Button" Width="0px" />
            </td>
        </tr>
    </table>
    <cc1:ModalPopupExtender ID="mpeFecha" runat="server" BackgroundCssClass="modalBackground"
        DropShadow="true" OkControlID="btnOkCero" PopupControlID="pnlFecha" TargetControlID="btnCero">
    </cc1:ModalPopupExtender>
</asp:Content>
